package com.momo.hotel.controller;

import com.momo.hotel.dao.pojo.TbHotelBrank;
import com.momo.hotel.service.impl.HotelBrankServiceImpl;
import com.momo.hotel.vo.VoShow;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @version 1.0.0
 * @auther Snake
 * @date 2019/7/3 9:40
 */
@RestController
public class ShowController {
    @Resource
    HotelBrankServiceImpl hotelBrankService;

    @RequestMapping(value = "showHotel", method = RequestMethod.POST)
    public List<TbHotelBrank> showHotel(@RequestBody VoShow voShow){


        return hotelBrankService.selectHotel("%"+voShow.getLocation()+"%");
    }


}
